package com.bupt.chapter.third.ants_climbing;

public class Ant {
	public int position = 0;
	public int direction = 0;

	public Ant(int position, int direction) {
		this.position = position;
		this.direction = direction;
	}

	public void nextMove() {
		position += direction;
	}
	
	public void chgDir(){
		direction = -direction;
	}
}
